package cn.bx.bid.dao;

import cn.bx.bid.entity.Professor;
import cn.bx.bid.entity.WorkHistory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProfessorDao {
    public List<Professor> search(@Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("name") String name, @Param("tele") String tele, @Param("identityNumber") String identityNumber);
    public int searchTotal(@Param("name") String name, @Param("tele") String tele, @Param("identityNumber") String identityNumber);
    int add(Professor p);
    int update(Professor u);
    public Professor get(long id);

    /* 批量删除 */
    int delALL(@Param("ids") long[] ids);
//删除指定专家的工作记录，不单独设置historyDao
    /**
     *
     * @param hisid 历史记录号
     * @return
     */
    int delHis(@Param("hisid") long hisid);

    int addHistory(WorkHistory w);
   public WorkHistory getHistory(long id);

    public WorkHistory getHistoryid(long id);
    int updateWorkhistory(WorkHistory workhistory);

    //查找专家参与过的项目
    public Professor projectGet(long id);
}
